<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<title>Photo Gallery -- Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/bootstrap-metro-theme.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/default.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/component.css"/>">
<script src="<c:url value="/resources/js/modernizr.custom.js"/>"></script>
<script type="text/javascript">
	function check_file() {
		str = document.getElementById('fileToUpload').value.toUpperCase();
		suffix = ".JPG";
		suffix2 = ".JPEG";
		if (!(str.indexOf(suffix, str.length - suffix.length) !== -1 || str
				.indexOf(suffix2, str.length - suffix2.length) !== -1)) {
			alert('File type not allowed,\nAllowed file: *.jpg,*.jpeg');
			document.getElementById('fileToUpload').value = '';
		}
	}
</script>
</head>
<body>
	<div class="" id="loginModal">
		<div class="modal-body">
			<div class="well">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#login" data-toggle="tab">Login</a></li>
				</ul>
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane active in" id="login">
						<form:form class="form-horizontal" id="contact-form"
							commandName="user">
							<fieldset>
								<div class="control-group">
									<!-- Username -->
									<label class="control-label" for="username">Username</label>
									<div class="controls">
										<form:input path="userName" type="text" id="username"
											name="username" placeholder="" class="input-xlarge" />
									</div>
								</div>
								<div class="control-group">
									<!-- Password-->
									<label class="control-label" for="password">Password</label>
									<div class="controls">
										<form:input path="password" type="password" id="password"
											name="password" placeholder="" class="input-xlarge" />
									</div>
								</div>
								<div class="control-group">
									<!-- Button -->
									<div class="controls">
										<input type="submit" class="btn btn-success" value="Login" />
										<a class="btn btn-primary" href="register"> Create Account</a>
									</div>
								</div>
							</fieldset>
						</form:form>
					</div>

				</div>
			</div>
		</div>
	</div>
	<!-- 
	<c:if test="${logged == true}">
		<div class="" id="loginModal">
			<div class="modal-body">
				<div class="well">
					<h3>Hello, ${loggedUser}!</h3>
					<a class="btn btn-info" href="logout"><i class="icon-off"></i>Log Out</a>
				</div>
			</div>
		</div>
	</c:if>
	 -->
</body>
</html>
